﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LGW.DTO;

public partial class Admin_Orders : System.Web.UI.Page
{
    IList<OrderItems> oIListOrderItems = new List<OrderItems>();

    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        lblMsg.Text = ddlItemCategory.SelectedItem.Value;
     
        mpeorderItem.Show();
    }
    protected void btnCancel_Click(object sender, EventArgs e)
    {
        mpeorderItem.Hide();
       
    }
    private void AssignValues()
    {
        OrderItems objorderItems = new OrderItems();
        objorderItems.orderItemkey = objorderItems.CustomerId.ToString() + DateTime.Now.ToString("ddMMyyyyhhmmssffftt");
        objorderItems.ItemCategoryId = Convert.ToInt32(ddlItemCategory.SelectedItem.Value);
        objorderItems.ItemDesc = txtItemDesc.Text.Trim();
        objorderItems.Quantity = Convert.ToInt32(txtQuantity.Text.Trim());
        objorderItems.Weight = Convert.ToDecimal(txtWeight.Text.Trim());
        objorderItems.Wastage = Convert.ToDecimal(txtWastage.Text.Trim());
        objorderItems.MakingCharge = Convert.ToDecimal(txtMakingCharge.Text.Trim());
        objorderItems.Size = Convert.ToDecimal(txtSize.Text.Trim());
        objorderItems.SizeUnitId = Convert.ToInt32(ddlSizeUnit.SelectedItem.Value);
        //Stones details
        objorderItems.StonesDesc = txtStonesDesc.Text.Trim();
        objorderItems.StonesCount = Convert.ToInt32(txtStonesCount.Text.Trim());
        objorderItems.StonesWeight = Convert.ToDecimal(txtStonesWeight.Text.Trim());
        objorderItems.StonesUnitId =Convert.ToInt32( ddlStoneUnit.SelectedItem.Value);
        objorderItems.StonesCost = Convert.ToDecimal(txtStonesCost.Text.Trim());
        oIListOrderItems.Add(objorderItems);
    }
}